import http from '@utils/request'
import { type IUserData, type IMenuData } from '@interface/user'

// 获取个人信息
export function getInfo(): Promise<IUserData> {
  return http.get<IUserData>('/personal/getInfo')
}

// 获取路由
export function getUserMenu(rolePerm: string): Promise<IMenuData> {
  return http.get<IMenuData>(`/personal/getRouters/${rolePerm}`)
}
